package com.example.demo01minio.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo01minio.domain.Emp;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author lingx
 * @description 针对表【t_emp】的数据库操作Mapper
 * @createDate 2024-08-28 08:58:19
 * @Entity com.example.demo01minio.domain.Emp
 */
@Mapper
public interface EmpMapper extends BaseMapper<Emp> {

    List<Emp> selectBetweenSalary(@Param("start") int start, @Param("end") int end);

    /**
     * QueryWrapper: 查询条件的动态sql的构建器
     * 作用：可以将设置的多个动态条件 转为动态sql字符串
     *
     * @param queryWrapper
     * @return
     */
//    List<Emp> selectBetweenSalaryByWrapper(@Param("ew") QueryWrapper<Emp> queryWrapper);
        List<Emp> selectBetweenSalaryByWrapper(@Param(Constants.WRAPPER) QueryWrapper<Emp> queryWrapper);


    List<Emp> selectPageBetweenSalaryByWrapper(Page<Emp> page,@Param("ew") QueryWrapper<Emp> queryWrapper);
}




